package com.cyou.qb.common.dao;

import java.util.List;

import org.springframework.stereotype.Component;

import com.cyou.qb.common.domain.Code;

/**
 * <p>字典表相关</p>
 * @author zoudongchao
 *
 */
@Component
public class CodeDao extends MysqlBaseDao {
	
	/**
	 * <p>根据type删除数据</p>
	 * @param type 数据类型
	 * @return 受影响的条数
	 */
	public int deleteDataByType(String type) {
		return this.delete("deleteDataByType", type);
	}
	
	/**
	 * <p>批量插入到字典表</p>
	 * @param codeList 字典记录List
	 * @return 插入的行数
	 */
	public int insert(List<Code> codeList) {
		return this.insert("insertIntoCode", codeList);
	}
}
